package com.daoyin.ssph.service.impl;

import java.util.List;

import com.daoyin.ssph.bean.Application;
import com.daoyin.ssph.dao.ApplicationDAO;
import com.daoyin.ssph.service.AppService;

public class AppServiceImpl extends BaseServiceImpl<Application> implements AppService {
	private ApplicationDAO dao;
	public void setDao(ApplicationDAO dao) {
		this.dao = dao;
	}
	public String add(Application t) {
		dao.save(t);
		return "success";
	}
	public List<Application> query(){
		List<Application> list = dao.findAll();
		return list;	
	}
	public Application query(Integer id){
		Application app = dao.findById(id);
		return app;	
	}
	
	public void delete(Integer id){
		Application app = dao.findById(id);
		dao.delete(app);
	}
}
